<?php 
$dir="resource/";
$BASE="../";
if (isset($_GET["file"])) {
	$filetitle= "DOWNLOADING  file ";
    $file=$_GET["file"];
	if(is_file($file)){
    header("Content-type: application/force-download");
    header("Content-Transfer-Encoding: Binary");
   @ header("Content-length: ".filesize($file));
    header("Content-disposition: attachment; filename=\"".basename($file)."\"");
    readfile("$file");
	}
	else{
		 $eMessage ="File Not Found <span style='padding-left:20px;color:red;font-size:90%'>1".$file."2</span>";
		 $title="Downloading ".$_GET["file"]." - file not found ";
		 include("../template/default.php");
	}
} else {
   $eMessage = "No file selected";
    $title="Downloading ".$_GET["file"]. $eMessage ;
   include("../template/default.php");
}
 ?> 